<!-- $Id: category_info.htm 16752 2009-10-20 09:59:38Z wangleisvn $ -->
{include file="pageheader.htm"}
<!-- start add new category form -->
<div class="main-div">
  <form action="index_mgt.php" method="post" name="theForm" enctype="multipart/form-data" onsubmit="return validate()">
  <table width="100%" id="general-table">
      <tr>
        <td class="label">{$lang.inc_name}</td>
        <td>
          <input type='text' name='inc_name' maxlength="100" value='{$cat_info.inc_name}' size='27' /> {$lang.require_field}
        </td>
      </tr>
      <tr>
        <td class="label"><a href="javascript:showNotice('noticeCode');" title="{$lang.form_notice}"><img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a> {$lang.inc_code}</td>
        <td>
          <input type='text' name='inc_code' maxlength="100" value='{$cat_info.inc_code}' size='27' /> {$lang.require_field}<br />
          <span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="noticeCode">{$lang.notice_inc_code}</span>
        </td>
      </tr>
      {if $cat_info.level neq 'top'}
      <tr>
        <td class="label">{$lang.parent_id}</td>
        <td>
          <select name="parent_id">
          {foreach from=$parent_info item=v}
          <option value="{$v.inc_id}" {if $v.inc_id eq $cat_info.parent_id}selected{/if}>{$v.inc_name_level}{$v.inc_name}</option>
          {/foreach}
          </select>
        </td>
      </tr>
      <tr>
        <td class="label">{$lang.sort_order}</td>
        <td>
          <input type='text' name='sort_order' value='{$cat_info.sort_order}' size='10' />
        </td>
      </tr>
      {/if}
   </table>
      <div class="button-div">
        <input type="submit" value="{$lang.button_submit}" />
        <input type="reset" value="{$lang.button_reset}" />
      </div>
    <input type="hidden" name="act" value="{$form_act}" />
    <input type="hidden" name="level" value="{$cat_info.level}" />
    <input type="hidden" name="inc_id" value="{$cat_info.inc_id}" />
  </form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="JavaScript">
<!--
document.forms['theForm'].elements['inc_name'].focus();
/**
 * 检查表单输入的数据
 */
function validate()
{
  validator = new Validator("theForm");
  validator.required("inc_name",      name_empty);
  {if $cat_info.level eq 'top'}
  validator.required("inc_code",      code_empty);
  {/if}
  return validator.passed();
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}